adt8097使用中的通讯协议
一、版本(见8097电路板上芯片标贴)与协议对应表
日期 |
版本 |
协议名称 |
2004-8-10 |
hv1.0 |
pelco-p |
|
|
|
二、通讯协议
1、Pelco
"P" protocol
This section describes the protocol used when sending commands to an Intercept Dome in the “P” version protocol.
The protocol uses 1 start bit, 8 data bits, and one stop bit.
Byte |
Value |
Function |
1 |
$A0 |
STX (start transmission) |
2 |
$00 to $1F |
Address |
3 |
Data byte 1 |
(see below) |
4 |
Data byte 2 |
(see below) |
5 |
Data byte 3 |
(see below) |
6 |
Data byte 4 |
(see below) |
7 |
$AF |
ETX (end transmission) |
8 |
$00-$FF |
Check Sum |
The customer documentation specifies 32 receiver addresses numbered from 1 to 32.
The protocol is “zero indexed” so that the hexadecimal address sent in the protocol for the first receiver is $00.
This corresponds to address 1 in the user documentation.
The bits within the “Data bytes” are broken up into two main groups.
For Pan and Tilt commands, the functions are detemined as follows:
|
Bit number | |||||||
|
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Data 1 |
0 |
Camera On |
Autoscan On |
Camera on / off |
Iris Close |
Iris Open |
Focus Near |
Focus Far |
Data 2 |
0 |
Zoom Wide |
Zoom Tele |
Tilt Down |
Tilt Up |
Pan Left |
Pan Right |
0 (for pan / tilt) |
Data 3 |
Pan Speed $00 to $3F and $40 for Turbo | |||||||
Data 4 |
Tilt Speed $00 to $3F |
The extended command set will have bit 0 of data byte 2 set and will follow the format in the following table:
Command |
Data byte 1 |
Data byte 2 |
Data byte 3 |
Data byte 4 |
Set Preset XX |
00 |
03 |
00 |
01 to 20 |
Clear Preset XX |
00 |
05 |
00 |
01 to 20 |
Go To Preset XX |
00 |
07 |
00 |
01 to 20 |
Flip (rotate 180º) |
00 |
07 |
00 |
21 |
Zero Pan Position |
00 |
07 |
00 |
22 |
Set Aux XX |
00 |
09 |
00 |
01 to 08 |
Clear Aux XX |
00 |
0B |
00 |
01 to 08 |
Remote Reset |
00 |
0F |
00 |
00 |
Zone Start |
00 |
11 |
00 |
01 to 08 |
Zone End |
00 |
13 |
00 |
01 to 08 |
Write char to screen |
00 |
15 |
0 to 28 |
0 to 7F |
Clear Screen |
00 |
17 |
00 |
00 |
Alarm Ack |
00 |
19 |
00 |
01 to 08 |
Zone Scan On |
00 |
1B |
00 |
00 |
Zone Scan Off |
00 |
1D |
00 |
00 |
Pattern Start |
00 |
1F |
00 |
00 |
Pattern Stop |
00 |
21 |
00 |
00 |
Run Pattern |
00 |
23 |
00 |
00 |
Zoom Lens Speed |
00 |
25 |
00 |
00 to 03 |
Focus Lens Speed |
00 |
27 |
00 |
00 to 03 |
The receiver will respond with an ACK.
To accommodate features of new systems and maintain compatibility with our old systems,
some functions have been added through the use of some of the unused preset functions.
These are:
Preset Number |
Function |
99 |
Begin Auto-scan |
98 |
Begin Frame Scan |
97 |
Begin Random Scan |
96 |
Stop Scan |
95 |
Enter Menu Mode |
94 |
Remote Reset |
93 |
Set Right Limit Stop |
92 |
Set Left Limit Stop |
34 |
Home (return to 0 pan position) |
33 |
Flip |